package com.travel.server.manager.impl.sal;

import com.travel.server.manager.impl.enums.OrderRefundEnum;

import java.util.Arrays;
import java.util.List;

/**
 * @Author: LiZhenhui
 * @Date: 2018/11/6 20:45
 * @Desc:
 */
public class RefundSal {

    private static final int ALL = 1;

    private static final int REFUND_ING = 2;

    private static final int REFUND_CLOSE = 3;

    private static final int REFUND_SUCCESS = 4;

    public static List<String> getRefundOrderState(Integer label){
        switch (label){
            case ALL: return null;
            case REFUND_ING : return Arrays.asList(OrderRefundEnum.RETURN.getState(), OrderRefundEnum.APPLY.getState(), OrderRefundEnum.AGREE.getState());
            case REFUND_CLOSE : return Arrays.asList(OrderRefundEnum.REJECT.getState(), OrderRefundEnum.CLOSE.getState());
            case REFUND_SUCCESS : return Arrays.asList(OrderRefundEnum.SUCCESS.getState());
        }
        return null;
    }

    /**
     * 生成新退款支付流水号
     * @return
     */
    public static String getNewRefundId(){
        return "R" + System.currentTimeMillis();
    }
}
